var window1 = null;
var window2 = null;
var window3 = null;
var window4 = null;
var window5 = null;

//*********************************************
// 関数名：defaultOn()
// 引数　：ページタイトル(文字列)
// 概要　：各ページのタイトル表示をする
//*********************************************
function funcShowTitle(strTitle) {
  location.hash = "top";
  top.location.hash = "frametop";

  var objTitle;
  objTitle = document.getElementById("PageTitle");
  objTitle.innerHTML = strTitle;
}
//********************************************
// 関数名：funcLink()
// 引数　：リンク番号(1〜連番)
// 概要　：各ページへリンクします
//********************************************
function funcLink(intLinkNo) {
	switch (intLinkNo) {
		case 1:
			document.all.mainframe.src = "001.News/news.html";
			//document.getElementById("mainframe").src ="001.News/news.html";
			break;
		case 2:
			document.getElementById("mainframe").src ="002.Profile/profile.html";
			break;
		case 3:
			document.getElementById("mainframe").src ="003.Media/media.html";
			break;
		case 4:
			document.getElementById("mainframe").src ="004.Sound/sound.html";
			break;
		case 5:
			year = fncGetYear();
			document.getElementById("mainframe").src ="005.Live/live" + year + ".html";
			break;
		case 6:
			document.getElementById("mainframe").src ="006.Photo/photo.html";
			break;
		case 7:
			document.getElementById("mainframe").src ="007.Link/link.html";
			break;
		case 8:
			document.getElementById("mainframe").src ="008.Bbs/bbsframe.html";
			break;
		case 9:
			window1 = window.open("http://cathy-room.datura-web.com/","window5","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			//document.getElementById("mainframe").src ="009.Diary/diary1.html";
			break;
		case 10:
			window1 = window.open("http://diary4.cgiboy.com/1/kanako_datura/index.cgi?mode=out","window1","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 11:
			window2 = window.open("http://diary.cgiboy.com/d01/kaorimu/","window2","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 12:
			window3 = window.open("http://diary3.cgiboy.com/1/dr_macky/","window3","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 13:
			window4 = window.open("http://diary5.cgiboy.com/3/datura_staff/index.cgi?mode=out","window4","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 14:
			document.location.href="mailto:daturaer@hotmail.com";
			break;
		case 15:
			document.location.href="../mb/top.htm";
			break;
		case 16:
			document.getElementById("mainframe").src ="010.shop/shop.html";
			break;
		default:
			document.location.href="opening_pc.html";
			break;
	}
}

//********************************************
// 関数名：funcLink_e()
// 引数　：英語版ホムペのリンク番号(1〜連番)
// 概要　：各ページへリンクします
//********************************************
function funcLink_e(intLinkNo) {
	switch (intLinkNo) {
		case 1:
			document.getElementById("mainframe").src ="001.News/news_e.html";
			break;
		case 2:
			document.getElementById("mainframe").src ="002.Profile/profile_e.html";
			break;
	//    case 3:
	//      location.href="../003.Media/media.html";
	//      break;
		case 4:
			document.getElementById("mainframe").src ="004.Sound/sound_e.html";
			break;
		case 5:
			year = fncGetYear();
			document.getElementById("mainframe").src ="005.Live/live_e" + year + ".html";
			break;
		case 6:
			document.getElementById("mainframe").src ="006.Photo/photo_e.html";
			break;
	//    case 7:
	//      location.href="../007.Link/link.html";
	//      break;
	    case 8:
			document.getElementById("mainframe").src ="008.Bbs/bbsframe.html";
			break;
	/*
		case 9:
			document.getElementById("mainframe").src ="009.Diary/diary1.html";
			break;
		case 10:
			window1 = window.open("http://diary4.cgiboy.com/1/kanako_datura/index.cgi?mode=out","window1","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 11:
			window2 = window.open("http://diary.cgiboy.com/d01/kaorimu/","window2","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 12:
			window3 = window.open("http://diary3.cgiboy.com/1/dr_macky/","window3","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
		case 13:
			window4 = window.open("http://diary5.cgiboy.com/3/datura_staff/index.cgi?mode=out","window4","left=0,top=0,width=700,height=500,resizable=yes,scrollbars=yes");
			break;
	*/
		case 14:
			document.location.href="mailto:daturaer@hotmail.com";
			break;
	//    case 15:
	//      document.location.href="../../mb/top.htm";
	//      break;
		case 16:
			document.getElementById("mainframe").src ="010.shop/shop_e.html";
			break;
		default:
			document.getElementById("mainframe").src ="opening_pc.html";
			break;
	}
}


//*********************************************
// 関数名：funcWindowclose()
// 引数　：なし
// 概要　：openされいる個別画面を閉じる
//*********************************************
function funcWindowclose() {
  if(window1 != null && !window1.closed){
   //かなちゃんの日記を閉じる
    window1.close();
  }
  if(window2 != null && !window2.closed){
   //かおりんの日記を閉じる
    window2.close();
  }
  if(window3 != null && !window3.closed){
   //まっきーの日記を閉じる
    window3.close();
  }
  if(window4 != null && !window4.closed){
   //スタッフ日記を閉じる
    window4.close();
  }
  if(window5 != null && !window5.closed){
   //きゃしーの日記を閉じる
    window5.close();
  }
}

//*********************************************
// 関数名：fncGetYear()
// 引数　：なし
//*********************************************
function fncGetYear() {
	dd = new Date();
	yy = dd.getYear();
	if (yy < 2000) { 
		yy += 1900; 
	}
	return yy;
}
